using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BuffBounty:BuffBase {

	public override string spriteName => "bounty";

	public BuffBounty(BuffSlot slot,Mob mob) : base(slot,mob) { }

	protected override void SubscribeEvents() {
		base.SubscribeEvents();
		Mob.Death+=Mob_Death;
	}
	protected override void UnsubscribeEvents() {
		base.UnsubscribeEvents();
		Mob.Death-=Mob_Death;
	}

	private void Mob_Death(object sender,DeathEventArgs e) {
		if((sender as Mob)!=mob) return;
		Coin.Create(mob.position,Mathp.FloatAsExpectation(stacks));
	}

}